package handler;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import org.apache.commons.dbutils.ResultSetHandler;

import drh.bean.Integral;

public class IntegralResultSetHandler implements ResultSetHandler<List<Integral>> {

	@Override
	public List<Integral> handle(ResultSet rs) throws SQLException {
		List<Integral>list = new ArrayList<>();
		while(rs.next()) {
			Integral info = new Integral();
			info.setId(rs.getInt("id"));
			info.setUserid(rs.getInt("userid"));
			info.setOrderUID(rs.getInt("orderUID"));
			info.setIntegral(rs.getInt("integral"));
			info.setTime(rs.getDate("time"));
			info.setIsdelete(rs.getInt("isdelete"));
			list.add(info);
		}
		return list;
	}

}
